package fr.p10.miage.applianceTest;

import org.testng.AssertJUnit;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import fr.upo.miage.dp.state.appareil.ApplianceCommunicationException;
import fr.upo.miage.dp.state.appareil.state.ApplianceState;

public class TestApplicanceOnToStart extends TestRoot{

	@BeforeClass
  	public static void setUp() throws ApplianceCommunicationException{
		TestApplianceOFFtoON.setUp();
		TestApplianceOFFtoON.testOffToOn();
	}
	
	@Test 
	public void testIsON(){
		current = toaster.getState(); 
		AssertJUnit.assertEquals(ApplianceState.ON, current);
	}
	
	@Test
	public static void testOnToStart() throws ApplianceCommunicationException{
		toaster.start();
		current = toaster.getState();
		AssertJUnit.assertEquals(ApplianceState.STARTED, current);
	}
}
